package Fenetres;

import java.awt.BorderLayout;
import java.awt.EventQueue;
import java.awt.Image;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class Fenetre_Gerer_Profil extends JFrame {

	private JPanel contentPane;
	private Fenetre_Creer_Profil fenetre1;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					Fenetre_Gerer_Profil frame = new Fenetre_Gerer_Profil();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public Fenetre_Gerer_Profil() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 607, 502);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JButton btnCreerProfil = new JButton("    Creer Profil");
		Image icon1 = new ImageIcon(this.getClass().getResource("/user.png")).getImage();
		btnCreerProfil.setIcon(new ImageIcon(icon1));
		btnCreerProfil.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				

				if(fenetre1 == null) {
					fenetre1 = new Fenetre_Creer_Profil();
					fenetre1.setVisible(true);
				}
				else {
					
					fenetre1.setVisible(true);
				}		
				
			}
		});
		btnCreerProfil.setBounds(192, 51, 245, 50);
		contentPane.add(btnCreerProfil);
		
		JButton btnModifierProfil = new JButton("    Modifier Profil");
		Image icon2 = new ImageIcon(this.getClass().getResource("/settings.png")).getImage();
		btnModifierProfil.setIcon(new ImageIcon(icon2));
		btnModifierProfil.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				
				if(fenetre1 == null) {
					fenetre1 = new Fenetre_Creer_Profil();
					fenetre1.setVisible(true);
				}
				else {
					
					fenetre1.setVisible(true);
				}	
				
			}
		});
		btnModifierProfil.setBounds(192, 133, 245, 50);
		contentPane.add(btnModifierProfil);
		
		JButton btnSupprimerProfil = new JButton("   Supprimer Profil");
		Image icon3 = new ImageIcon(this.getClass().getResource("/rubbish.png")).getImage();
		btnSupprimerProfil.setIcon(new ImageIcon(icon3));
		btnSupprimerProfil.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				
				
			}
		});
		btnSupprimerProfil.setBounds(192, 218, 245, 50);
		contentPane.add(btnSupprimerProfil);
		
		JButton btnRetour = new JButton("   Retour");
		Image icon4 = new ImageIcon(this.getClass().getResource("/left-arrow.png")).getImage();
		btnRetour.setIcon(new ImageIcon(icon4));
		btnRetour.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				
				
			}
		});
		btnRetour.setBounds(39, 403, 99, 33);
		contentPane.add(btnRetour);
		
		JButton btnChangerProfilDune = new JButton("  Changer Profil Personne");
		Image icon5 = new ImageIcon(this.getClass().getResource("/exchange.png")).getImage();
		btnChangerProfilDune.setIcon(new ImageIcon(icon5));
		btnChangerProfilDune.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				
				
			}
		});
		btnChangerProfilDune.setBounds(192, 302, 245, 50);
		contentPane.add(btnChangerProfilDune);
	}

}
